Home > Use Cases > Changing VM Advanced Settings

Changing VM Advanced Settings

A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920db

When a VM has been configured, its advanced settings can be altered using another API call. Apart from this, the advanced settings can also be retrieved. The URL for both of these scenarios is the same but when it comes to update, a POST request must be made, whilst when retrieving the settings, a GET request must be made instead.

The following GET request retrieves the advanced settings for a configured VM:

http://localhost:35113/api/vms/settings/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e

 

The VirtualMachineSettings object which is located in the response of the above call, can be used as the body parameter for the POST request, which in turn updates the advanced settings. The following POST request updates the advanced settings for a configured VM:

http://localhost:35113/api/vms/settings/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e

 

Unlike the GET request, this POST request requires a body parameter, which is basically the VirtualMachineSettings object which is retrieved from the GET request. The following are the parameters which are required when updating the advanced settings

  • ReverseDelta: The number of backups which need to be taken before a new full backup is taken.
  • UseCompression: Whether to enable compression for the VM’s backups.
  • UseEncryption: Whether to enable encryption for the VM’s backups.
  • ExcludeIsos: Whether to backup ISOs attached to the VM. When this is set to true, ISOs are not backed up, whilst when it is set to false, ISOs are backed up.
  • ApplicationConsistent: Whether to enable application consistent backups. When this is set to true, backups are application consistent, whilst when this is set to false, backups are not application consistent.
  • EnableCbt: Whether Change Block Tracking is enabled for the VM. This can only be enabled for VMware VMs. If this is enabled for a HyperV VM, the operation will fail.
  • BackupLocationRetentionPolicyInDays: The number of days before retention policy runs for the VM’s primary backup location.
  • OffsiteLocationRetentionPolicyInDays: The number of days before retention policy runs for the VM’s offsite backup location.

 

Note: A full list of available API commands can be found here